#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int main()
{
	int num;
	int x, k;
	int sum1;
	scanf("%d", &num);
	for (x = 100; x >= 1; x--)
	{
		for (k = 1; k <= 100; k++)
		{
			int sum = 0;
			int n = 52;
			while (n > 0)
			{
				switch (1)
				{
				case 1:sum += x;
				case 2: sum += x + k;
				case 3: sum += x + 2 * k;
				case 4: sum += x + 3 * k;
				case 5:sum += x + 4 * k;
				case 6:sum += x + 5 * k;
				case 7: sum += x + 6 * k;
				}
				n--;
				sum1 = sum;
			}
			if (sum1 == num)
			{
				printf("%d\n%d", x, k);
				goto again;
			}
		}
	}
again:return 0;
}